/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.artic.ogre.handler;

import com.artic.ogre.model.Scene;
import com.jme3.asset.AssetManager;
import com.jme3.scene.Node;

/**
 *
 * @author czarnik_a
 */
public class SceneProcessor {

    private ISceneHandler previeHandler;
    private ISceneHandler firstHandler;


    public void addHandler(ISceneHandler handler) {
        if (firstHandler == null){
            firstHandler = handler;
        }

        if (previeHandler != null){
            previeHandler.setNext(handler);
        }
        previeHandler = handler;
    }

    public void processHandlers(Scene dotScene, Node root,AssetManager assetManager) {
        firstHandler.handleScene(dotScene, root, assetManager);
    }

}
